package schema

import (
	"time"

	"entgo.io/ent/schema/mixin"

	"entgo.io/ent"
	"entgo.io/ent/schema/field"
)

type ormMixin struct {
	mixin.Schema
}

func (ormMixin) Fields() []ent.Field {
	return []ent.Field{
		field.Int64("id").Unique().Immutable(),
		field.Time("create_time").
			Default(time.Now).Immutable(),
		field.Time("update_time").
			Default(time.Now),
	}
}
